import VisitorShow from './VisitorShow'
import VisitorAdd from './VisitorAdd'
import VisitorDetails from './VisitorDetails';
import { useState ,useEffect} from 'react';
import http from '../../utils/http';
const Visitor_information_registration = () => {
  // useEffect(()=>{
  //   http({
  //     url:'/visit-record/visitRecordList',
  //   }).then((res)=>{
  //     console.log(res);
  //   })
  // },[])
  const [state, setState] = useState(1)
  let com
  if (state == 1) {
    com = <div className='Tenant_information_management'><VisitorShow setState={setState}></VisitorShow></div>
  }
  else if (state == 2) {
    com = <div className='Tenant_information_management'><VisitorAdd setState={setState}></VisitorAdd></div>
  }
  else if (state == 3) {
    com = <div className='Tenant_information_management'><VisitorDetails setState={setState}></VisitorDetails></div>
  }
  return <>
  {com}
 </>;

};

export default Visitor_information_registration;
